Add smooth-scroll to GtkTextView event mask
authorDaniel Stone <daniel@fooishbar.org>
Tue, 6 Mar 2012 15:52:38 +0000 (15:52 +0000)
committerPaolo Borelli <pborelli@gnome.org>
Tue, 6 Mar 2012 20:45:09 +0000 (21:45 +0100)
Without any extra supporting code, just adding GTK_SMOOTH_SCROLL_MASK to
the event mask for GtkTextView makes GEdit do the right thing and scroll
smoothly.  Lovely.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
https://bugzilla.gnome.org/show_bug.cgi?id=671488

gtk/gtktextview.c

index a69040da0c60e5296c715e14395f7619cdad7eb7..33f2b5ccff60f63167058e83c843e997885d65a5 100644 (file)
@@ -8449,6 +8449,7 @@ text_window_realize (GtkTextWindow *win,
   attributes.height = win->allocation.height;
   attributes.event_mask = (GDK_EXPOSURE_MASK            |
                            GDK_SCROLL_MASK              |
+                           GDK_SMOOTH_SCROLL_MASK       |
                            GDK_KEY_PRESS_MASK           |
                            GDK_BUTTON_PRESS_MASK        |
                            GDK_BUTTON_RELEASE_MASK      |